|
In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer memory and file storage, while speeding up display refresh and file transfers. It is a form of vector quantization compression. When an image is encoded in this way, color information is not directly carried by the image pixel data, but is stored in a separate piece of data called a palette: an array of color elements. Every element in the array represents a color, indexed by its position within the array. The individual entries are sometimes known as color registers. The image pixels do not contain the full specification of its color, but only its index in the ''palette''. This technique is sometimes referred as pseudocolor or indirect color,〔(Computer Graphics, Prof. R. Eckert, Lect. #5, February 2001, Binghamton U., N.Y. )〕 as colors are addressed indirectly. Perhaps the first device that supported palette colors was a random-access frame buffer, described in 1975 by Kajiya, Sutherland and Cheadle.〔http://portal.acm.org/citation.cfm?id=281022〕 This supported a palette of 256 36-bit RGB colors. ==Palette size== (詳細はdisplay adapter hardware, so it is not a coincidence that those numbers are exact powers of two (the binary code): 22 = 4, 24 = 16 and 28 = 256. While 256 values can be fit into a single 8-bit byte (and then a single indexed color pixel also occupies a single byte), pixel indices with 16 (4-bit, a nibble) or fewer colors can be packed together into a single byte (two nibbles per byte, if 16 colors are employed, or four 2-bit pixels per byte if using 4 colors). Sometimes, 1-bit (2-color) values can be used, and then up to eight pixels can be packed into a single byte; such images are considered ''binary images'' (sometimes referred as a ''bitmap'' or ''bilevel image'') and not an indexed color image. If simple video overlay is intended through a ''transparent color'', one palette entry is specifically reserved for this purpose, and it is discounted as an available color. Some machines, such as the MSX series, had the transparent color reserved by hardware.〔(Online datasheet for the Texas Instruments TMS9918 Video Chip used in the MSX. )〕 Indexed color images with palette sizes beyond 256 entries are rare. The practical limit is around 12-bit per pixel, 4,096 different indices. To use indexed 16 bpp or more does not provide the benefits of the indexed color images' nature, due to the color palette size in bytes being greater than the raw image data itself. Also, useful direct RGB Highcolor modes can be used from 15 bpp and up. If an image has many subtle color shades, it is necessary to select a limited repertoire of colors to approximate the image using color quantization. Such a palette is frequently insufficient to represent the image accurately; difficult-to-reproduce features such as gradients will appear blocky or as strips (''color banding''). In those cases, it is usual to employ dithering, which mixes different-colored pixels in patterns, exploiting the tendency of human vision to blur nearby pixels together, giving a result visually closer to the original one. Here is a typical indexed 256-color image and its own palette (shown as a rectangle of swatches): : 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「indexed color」の詳細全文を読む スポンサード リンク
|